import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';

import 'app/appliction/app_controller_binding.dart';
import 'app/routes/app_pages.dart';

void main() {
  WidgetsFlutterBinding.ensureInitialized();
  //配置透明的状态栏
  SystemUiOverlayStyle systemUiOverlayStyle =
      const SystemUiOverlayStyle(statusBarColor: Colors.transparent);
  SystemChrome.setSystemUIOverlayStyle(systemUiOverlayStyle);
  runApp(ScreenUtilInit(
      //按照设计图的尺寸进行适配
      designSize: const Size(1080, 1920),
      minTextAdapt: true,
      splitScreenMode: true,
      builder: (context, child) {
        return GetMaterialApp(
            title: "Application",
            debugShowCheckedModeBanner: false,
            //去掉debug图标
            //在初始化入口配置绑定全局的Controller
            initialBinding: AppControllerBinding(),
            initialRoute: AppPages.INITIAL,
            theme:ThemeData(primarySwatch: Colors.grey),
            getPages: AppPages.routes);
      }));
}
